package com.objcat.servicea.service.impl;

import com.objcat.servicea.entity.vo.UserVo;
import com.objcat.servicea.entity.po.UserRolePo;
import com.objcat.servicea.mapper.UserRoleMapper;
import com.objcat.servicea.service.UserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author misheep
 * @since 2020-07-27
 */
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRolePo> implements UserRoleService {

    @Autowired
    private UserRoleMapper userRoleMapper;

    /**
     * 获取用户角色关联
     * @param userDto
     * @return
     */
    @Override
    public UserRolePo getUserRole(UserVo userDto) {
        return  userRoleMapper.selectById(userDto.getUserId());
    }
}
